package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 工单费用项
 * </p>
 *
 * @author long
 * @since 2025-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_work_order_cost")
public class WorkOrderCostDo extends Model<WorkOrderCostDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 工单id
     */
    @TableField("work_order_id")
    private Long workOrderId;

    /**
     * 计费项名称
     */
    @TableField("item_name")
    private String itemName;

    /**
     * 计费变量
     */
    @TableField("billing_variable")
    private String billingVariable;

    /**
     * 单价
     */
    @TableField("unit_price")
    private BigDecimal unitPrice;

    /**
     * 数量
     */
    @TableField("qty")
    private Integer qty;

    /**
     * 计费项费用
     */
    @TableField("item_fee")
    private BigDecimal itemFee;

    /**
     * 币种
     */
    @TableField("currency_code")
    private String currencyCode;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
